#include <stdint.h>
#include <stdio.h>

enum {
    HANDLE_VD,
    HANDLE_CTRL
};
void ParseParamVd(void){
    printf("ParseParam vd \n");
};
void CheckParamVd(void){
    printf("CheckParam vd \n");
};
void MatchParamVd(void){
    printf("MatchParam vd \n");
};

void ParseParamCtrl(void) {
    printf("ParseParam ctrl \n");
};
void CheckParamCtrl(void) {
    printf("CheckParam ctrl \n");
};
void MatchParamCtrl(void) {
    printf("MatchParam ctrl \n");
};
/* 把同一个操作封装起来 */
struct cliTemplateCall {
    void (*ParseParam)(void);
    void (*CheckParam)(void);
    void (*MatchParam)(void);
    void (*MgmCall)(void);
    void (*NodeCreateTable)(void);
    void (*FillActionStatus)(void);
};

/* 定义需要操作到的表 */
const static struct cliTemplateCall CallTable[] = {
    [HANDLE_VD] = {ParseParamVd, CheckParamVd},
    [HANDLE_CTRL] = {ParseParamCtrl, NULL, MatchParamCtrl},
};

int main(void){
    CallTable[HANDLE_VD].ParseParam();
    CallTable[HANDLE_VD].CheckParam();

    CallTable[HANDLE_CTRL].ParseParam();
    CallTable[HANDLE_CTRL].MatchParam();
}
